// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 新增 同步任务  POST */
export async function saveSynchrony(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/datahub/synchrony/save', {
    method: 'POST',
    data: options || {},
  });
}

/** 修改 同步任务  POST */
export async function updateSynchrony(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/datahub/synchrony/update', {
    method: 'POST',
    data: options || {},
  });
}
/** 删除 同步任务  POST */
export async function deleteSynchrony(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/datahub/synchrony/delete', {
    method: 'POST',
    data: options || {},
  });
}
/** 启动/关闭 同步任务  POST */
export async function updateStateSynchrony(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/datahub/synchrony/update/state', {
    method: 'POST',
    data: options || {},
  });
}
/** 列表   POST */
export async function pageSynchrony(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<DatahubSynchronyData.SynchronyPage[]>>(
    '/datahub/synchrony/page',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 执行  POST */
export async function executeSynchrony(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/datahub/synchrony/execute', {
    method: 'POST',
    data: options || {},
  });
}

/** 	执行全部  POST */
export async function executeAllSynchrony(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/datahub/synchrony/execute/all', {
    method: 'POST',
    data: options || {},
  });
}

/** 	下次执行时间 同步任务  POST */
export async function getNextTriggerTimeSynchrony(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<DatahubSynchronyData.SynchronyPage>>(
    '/datahub/synchrony/getNextTriggerTime',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 	修复调度器配置  POST */
export async function repairSynchrony(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/datahub/synchrony/repair', {
    method: 'POST',
    data: options || {},
  });
}

/** 日志 列表   POST */
export async function pageSynchronyLog(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<DatahubSynchronyData.SynchronyLogPage[]>>(
    '/datahub/synchrony/log/page',
    {
      method: 'POST',
      data: options || {},
    },
  );
}
